import request from '@/axios/axios.js';

export const getProcListApi = (params) => {
  return request({
    method: 'get',
    url: '/dms/procedure/list',
    params: params
  })
};

export const getMaterialListApi = (params) => {
  return request({
    method: 'get',
    url: '/dms/material/list',
    params: params
  })
};

export const getProcessListApi = (params) => {
  return request({
    method: 'get',
    url: '/dms/common/getProcessList',
    params: params
  })
};

export const getDeviceNoListApi = (params) => {
  return request({
    method: 'post',
    url: '/dms/device/page',
    data: params
  })
};

export const getMaterialTransferListApi = (params) => {
  return request({
    method: 'get',
    url: '/dms/common/getMaterialTransfer',
    data: params
  })
};

export const getWarehouseIdListApi = (params) => {
  return request({
    method: 'post',
    url: '/dms/dmsBackupConfig/queryBackups',
    data: params
  })
};
//后端添加一个仓库的接口 其他地方不变 不确定是否影响
export const getWarehouseIdListBackApi = (params) => {
  return request({
    method: 'get',
    url: '/dms/common/queryBackupList',
    params
  })
};

export const tmTestplanListApi = (params) => {
  return request({
    method: 'get',
    url: '/dms/test-plan/name-list',
    params: params
  })
};

// 查询
export const searchApi = (params) => {
  return request({
    method: 'get',
    url: '/dms/process-bom/list',
    params: params
  })
};

// 增加/修改
export const addUpdateApi = (params) => {
  return request({
    method: 'post',
    url: '/dms/process-bom/save',
    data: params
  })
};

// 根据ID 或者更根据版本号查询
export const infoApi = (params) => {
  return request({
    method: 'get',
    url: '/dms/process-bom/info',
    params: params
  })
};
// 查询信息
export const infoRouterApi = (params) => {
  return request({
    method: 'get',
    url: '/dms/process/info',
    params: params
  })
};

// 删除
export const deleteApi = (params) => {
  return request({
    method: 'delete',
    url: '/dms/process-bom/delete',
    data: params
  })
};

// 启用停用
export const qiTingApi = (params) => {
  return request({
    method: 'post',
    url: '/dms/process-bom/update-enable',
    data: params
  })
};

// 发布
export const faBuApi = (params) => {
  return request({
    method: 'post',
    url: '/dms/process-bom/publish',
    data: params
  })
};

